<template>
	<view style="">
		<image src="/static/xgbj.png" class="qjimg" mode=""></image>
		<view class="title">
			<image @click="fanhui" src="/static/zfh.png" :style="'margin-top:'+top+'px;'" mode=""></image>
			<view class="toptit" :style="'margin-top:'+top+'px;'">
				车位管理
			</view>
			<view class="" style="opacity: 0;">12</view>
		</view>
		<view class="xgzl" @click="sift">
			筛选
			<image src="../../static/sjxh.png" mode=""></image>
		</view>
		<view class="box" v-for="(item,index) in list" :key="index">
			<view class="box1" style="margin-top: 150rpx;">
				<view class="box1text">
					绑定时间：2022-03-16
				</view>
				<view class="box1text1">

				</view>
			</view>
			<view class="box2">
				<view class="box2-1" style="margin-left: 30rpx;">
					<view class="" style="display: flex;justify-content: space-between;align-items: center;">
						<view class="box2-1text">
							比邻小区1号楼1单元101室
							<view class="box2-1text1">
								业主名字
							</view>
						</view>
						<image style="width: 36rpx;height: 36rpx;margin-right:30rpx" src="../../static/ydh.png" mode=""
							@click="hujiao(item.mobile)">
						</image>
					</view>
					<view class="box2-1-1">
						<view class="box2-1-1box">
							<view class="">
								车牌号：
							</view>
						</view>
						<view class="box2-1-1box1">
							<view class="box2-1-1box1_text">
								{{item.carnumber}}
							</view>
							<view class="box2-1-1box1_text1">
							</view>
						</view>
					</view>
					<view class="box2-1-1" style="margin-top: 16rpx;">
						<view class="box2-1-1box">
							<view class="">
								车位号：
							</view>
						</view>
						<view class="box2-1-1box1">
							<view class="box2-1-1box1_text">
								{{item.carno}}
							</view>
							<view class="box2-1-1box1_text1">
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				top: 0,
				roomId: '',
				carnumber: '',
				carno: '',
				keyword: '',
				nextp: 1,
				list: [],
			}
		},
		onLoad() {
			let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
			// this.CustomBar = menuButtonInfo.bottom * 1 + 10
			this.top = menuButtonInfo.top * 1 + 10
		},
		onShow() {
			this.nextp = 1
			this.getlist()
		},
		methods: {
			getlist() {
				if (this.nextp) {
					var that = this
					that.$post('wuyecenter/getcar', {
						roomId: that.roomId,
						carnumber: that.carnumber,
						carno: that.carno,
						keyword: that.keyword,
						p: that.nextp,
					}, res => {
						if (that.nextp == 1) {
							that.list = res.data.list
						} else {
							res.data.list.forEach(item => {
								that.list.push(item)
							})
						}
						that.nextp = res.data.nextp
					})
				}

			},
			hujiao() {
				uni.makePhoneCall({
					phoneNumber: haoma //仅为示例
				});
			},
			sift() {
				uni.navigateTo({
					url: '/pages/carManage/carSift'
				})
			},
			fanhui() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: rgb(250, 250, 250);
	}

	.qjimg {
		width: 750rpx;
		height: 603rpx;
		position: absolute;
		top: 0;
		z-index: -1;
	}

	.title {
		display: flex;
		justify-content: space-between;
		align-items: center;

		>image {
			width: 20rpx;
			height: 35rpx;
			margin-left: 30rpx;
		}
	}

	.toptit {
		text-align: center;
		font-size: 36rpx;
		font-family: Source Han Sans CN;
		font-weight: 500;
		color: #ffffff;
	}

	.xgzl {
		width: 162rpx;
		height: 60rpx;
		position: absolute;
		right: 20rpx;
		margin-top: 30rpx;
		border-radius: 30rpx;
		background-color: white;
		font-size: 26rpx;
		font-family: Source Han Sans CN;
		font-weight: 500;
		text-align: center;
		line-height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: center;

		>image {
			width: 16rpx;
			height: 9rpx;
			margin-left: 10rpx;
		}
	}

	.box {}

	.box1 {
		width: 685rpx;
		height: 63rpx;
		margin: 0 auto;

		background-image: linear-gradient(to right, #fde7e7, #ffffff);
		border-top-left-radius: 15rpx;
		border-top-right-radius: 15rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.box1text {
		margin-left: 30rpx;
		font-size: 20rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #333333;
		line-height: 20rpx;
	}

	.box1text1 {
		margin-right: 30rpx;
		font-size: 20rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #333333;
		line-height: 20rpx;
	}

	.box2 {
		width: 685rpx;
		margin: 0 auto;
		background-color: white;
		border-bottom-left-radius: 15rpx;
		border-bottom-right-radius: 15rpx;
	}

	.box2-1 {
		padding: 30rpx 0;
	}

	.box2-1text {
		font-size: 28rpx;
		font-family: Source Han Sans CN;
		font-weight: 500;
		color: #000000;
		line-height: 20rpx;
		display: flex;
		align-items: center;
	}

	.box2-1text1 {
		margin-left: 16rpx;
		width: 92rpx;
		height: 36rpx;
		background-color: #fde7e7;
		border-radius: 5%;
		font-size: 18rpx;
		border-top-right-radius: 15rpx;
		border-bottom-right-radius: 15rpx;
		font-family: Source Han Sans CN;
		font-weight: 500;
		color: #DF3232;
		text-align: center;
		line-height: 36rpx;
	}

	.box2-1-1 {
		margin-top: 40rpx;
		display: flex;
		align-items: center;
	}

	.box2-1-1box {
		font-size: 36rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #DB203A;
		line-height: 36rpx;

		>view {
			font-size: 24rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #999999;
			line-height: 24rpx;
		}

	}

	.box2-1-1box1 {
		margin-left: 20rpx;
	}

	.box2-1-1box1_text {
		font-size: 24rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #333333;
		line-height: 24rpx;
		display: flex;
		align-items: center;

		>image {
			margin-left: 18rpx;
			width: 32rpx;
			height: 32rpx;
		}
	}

	.box2-1-1box1_text1 {
		font-size: 24rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #999999;
		line-height: 24rpx;
	}
</style>
